Skip to content

supergfxctl: drop nonexistent sudo group from D-Bus policy - #639

Merged
ryanrhughes merged 1 commit into
omacom:masterfrom
zz8011:supergfxctl-drop-sudo-dbus-group
Sep 28, 2026
Merged

ryanrhughes merged 1 commit into
omacom:masterfrom
zz8011:supergfxctl-drop-sudo-dbus-group

Conversation

@zz8011

@zz8011 zz8011 commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

What

The shipped D-Bus policy declares a group Arch does not have, so dbus-broker logs an error on every bus reload. Bump pkgrel and patch the policy file.

Files: pkgbuilds/supergfxctl/PKGBUILD (pkgrel 2 → 3), pkgbuilds/supergfxctl/drop-nonexistent-sudo-group.patch (new).

Problem

supergfxctl ships /usr/share/dbus-1/system.d/org.supergfxctl.Daemon.conf verbatim from
upstream. That file declares a policy for a group Arch does not have:

    <policy group="sudo">
        <allow send_destination="org.supergfxctl.Daemon"/>
        <allow receive_sender="org.supergfxctl.Daemon"/>
    </policy>

Arch has no sudo group (administrators are wheel), so dbus-broker rejects the block
by name on every bus reload and logs an error each time:

$ journalctl -b | grep 'Invalid group-name'
Sep 25 10:06:11 omarchy dbus-broker-launch[1284]: Invalid group-name in /usr/share/dbus-1/system.d/org.supergfxctl.Daemon.conf +9: group="sudo"
Sep 25 18:05:15 omarchy dbus-broker-launch[1284]: Invalid group-name in /usr/share/dbus-1/system.d/org.supergfxctl.Daemon.conf +9: group="sudo"
Sep 25 18:05:15 omarchy dbus-broker-launch[1284]: Invalid group-name in /usr/share/dbus-1/system.d/org.supergfxctl.Daemon.conf +9: group="sudo"
Sep 25 18:05:16 omarchy dbus-broker-launch[1284]: Invalid group-name in /usr/share/dbus-1/system.d/org.supergfxctl.Daemon.conf +9: group="sudo"

The +9 is line 9, exactly <policy group="sudo">. Five occurrences on a single boot here.

Impact is limited to log noise plus a dead policy block — nothing is actually denied:
the same file's group="wheel" block is what authorises an unprivileged user, and
supergfxctl -g works fine as a normal wheel user. The problem is that the error is
indistinguishable from a real bus-policy fault and repeats on every policy reload.

Why this belongs in the Omarchy recipe and not upstream

Upstream's data/org.supergfxctl.Daemon.conf still contains the block on main
(checked 2026-09-25), and that is deliberate: Debian/Ubuntu do have a sudo group, and
it is their administrator group. Arch, Fedora and openSUSE use wheel, which the same
file already covers. There is no way to express "only when the group exists" in busconfig,
so the correct layer for an Arch-only removal is the distro recipe — hence this patch
rather than an upstream change request. pkgbuilds/supergfxctl/.omarchy/package.json
has "sync": false, so the checked-in patch is not disturbed by upstream automation.

Change

 pkgrel=2 → pkgrel=3
 source=(".../supergfxctl-$pkgver.tar.gz"
+	"drop-nonexistent-sudo-group.patch")
-sha512sums=('bd94646d…')
+sha512sums=('bd94646d…'
+	'c24de0e6…')
+
+prepare() {
+	cd "$pkgname-$pkgver"
+	patch -p1 -i "$srcdir/drop-nonexistent-sudo-group.patch"
+}

The patch removes only the four-line sudo block; adm, users, wheel and root
policies are untouched.

Verification

Build flow, on the recipe as committed here:

$ makepkg -o --nodeps
==> Validating source files with sha512sums...
    supergfxctl-5.2.7.tar.gz ... Passed
    drop-nonexistent-sudo-group.patch ... Passed
==> Starting prepare()...
patching file data/org.supergfxctl.Daemon.conf
==> Sources are ready.
$ grep -c 'group="sudo"' src/supergfxctl-5.2.7/data/org.supergfxctl.Daemon.conf
0

makepkg --printsrcinfo is clean, and bash -n PKGBUILD passes.

End-to-end A/B on an installed 5.2.7-2 system: install the patched policy file, reload the
bus (SIGHUP; dbus-broker is not restarted), then restore the shipped file and reload again:

# patched file in place
$ sudo systemctl reload dbus-broker
reload 前 4 条 -> 后 4 条   # no new warning
$ supergfxctl -g
Hybrid                      # unprivileged access still works

# original file restored (sha256 144bf742…)
$ sudo systemctl reload dbus-broker
reload 前 5 条 -> 后 6 条   # warning returns

That isolates the block as the cause and shows the fix removes exactly the noise.

Risk

pkgrel bump only; no functional change for Arch users, since the removed block granted
them nothing. The remaining policies are byte-identical to upstream's.

Arch has no sudo group, so dbus-broker rejects that policy block by name on
every bus reload: "Invalid group-name in org.supergfxctl.Daemon.conf +9:
group=\"sudo\"". The block grants nothing here; the wheel policy in the same
file is what authorises an unprivileged user.

Remove the dead block with a checked-in patch and bump pkgrel.
@ryanrhughes ryanrhughes added the build-approved Maintainer approved this PR to build on the self-hosted pool label Sep 28, 2026
@ryanrhughes
ryanrhughes merged commit e8e3e28 into omacom:master Sep 28, 2026
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-approved Maintainer approved this PR to build on the self-hosted pool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants